package com.xs.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;
import java.io.Serializable;

/**
 * (Article)实体类
 *
 * @author makejava
 * @since 2022-09-27 11:26:35
 */
@Data
public class Article implements Serializable {
    private static final long serialVersionUID = -21149777219390506L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String name;
    /**
     * 内容
     */
    private String content;
    /**
     * 用户名称
     */
    private String user;
    /**
     * 发布时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date time;
    /**
     * 文章概述
     */
    private String summary;
    /**
     * 作者的id
     */
    private Integer uid;
    /**
     * 文章类型的id
     */
    private Integer tid;
    /**
     * 阅读次数
     */

    private Integer readnumber;
    /**
     * 状态码
     */
    private Integer cover;
    //文章类型
    @TableField(exist = false)//表明数据库中不存在
    private String type;

}

